{extend name="admin@index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">添加栏目</div>
    <div class="layui-card-body">
        <form class="layui-form form-horizontal" action="" method="post">
            <div class="layui-form-item">
                <label>名称</label>
                <div class="w300">
                    <input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="名称" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label>描述</label>
                <div class="w300">
                    <textarea name="description" placeholder="描述" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label>类型</label>
                <div class="w300">
                    <input type="radio" name="type" value="1" checked title="视图" lay-filter="type">
                    <input type="radio" name="type" value="2" title="控制器" lay-filter="type">
                </div>
            </div>
            <div class="layui-form-item">
                <label>状态</label>
                <div class="w300">
                    <input type="checkbox" name="status" lay-skin="switch" lay-text="启用|禁用" value="1" checked="">
                </div>
            </div>
            <div class="layui-form-item">
                <div>
                    <button class="layui-btn ajax-post" lay-submit lay-filter="*" target-form="form-horizontal">立即提交</button>
                    <button class="layui-btn layui-btn-normal" type="button" onclick="javascript :history.back(-1);">返回</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__STATIC__/libs/viewer/viewer.min.js"></script>
<link rel="stylesheet" href="__STATIC__/libs/viewer/viewer.min.css">
<script type="text/javascript">
    $('.uploader-list').each(function () {
        $(this).viewer();
    });
</script>
{/block}